//
//  InfoVC.m
//  ATAInterview
//
//  Created by up72-17 on 2018/12/18.
//  Copyright © 2018 up72-17. All rights reserved.
//

#import "InfoVC.h"

@interface InfoVC ()

@end

@implementation InfoVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/


- (IBAction)backButtonAction:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}


- (IBAction)sexButtonAction:(UIButton *)sender {
    if (sender.tag == 0) {
        [sex_1_image setImage:[UIImage imageNamed:@"选中"]];
        [sex_2_image setImage:[UIImage imageNamed:@"未选中"]];
        [sex_1_label setTextColor:kColorWithRGB(0x333333)];
        [sex_2_label setTextColor:kColorWithRGB(0xB3B3B3)];
    } else {
        [sex_2_image setImage:[UIImage imageNamed:@"选中"]];
        [sex_1_image setImage:[UIImage imageNamed:@"未选中"]];
        [sex_2_label setTextColor:kColorWithRGB(0x333333)];
        [sex_1_label setTextColor:kColorWithRGB(0xB3B3B3)];
    }
        
}



-(IBAction)buttonAction:(UIButton *)sender {
    MainVC *main = [[MainVC alloc] init];
    [self.navigationController pushViewController:main animated:YES];
}

- (void)textFieldDidBeginEditing:(UITextField *)textField {
    if ([textField isEqual:nameText]) {
        [line_1 setBackgroundColor:kColorWithRGB(0x00D985)];
    } else if ([textField isEqual:mailText]) {
        [line_2 setBackgroundColor:kColorWithRGB(0x00D985)];
    } else if ([textField isEqual:numText]) {
        [line_3 setBackgroundColor:kColorWithRGB(0x00D985)];
    } else if ([textField isEqual:idText]) {
        [line_5 setBackgroundColor:kColorWithRGB(0x00D985)];
    }
    NSLog(@"11");
}
- (void)textFieldDidEndEditing:(UITextField *)textField {
    NSLog(@"22222");
    if ([textField isEqual:nameText]) {
        [line_1 setBackgroundColor:kColorWithRGB(0xE6E6E6)];
    } else if ([textField isEqual:mailText]) {
        [line_2 setBackgroundColor:kColorWithRGB(0xE6E6E6)];
    } else if ([textField isEqual:numText]) {
        [line_3 setBackgroundColor:kColorWithRGB(0xE6E6E6)];
    } else if ([textField isEqual:idText]) {
        [line_5 setBackgroundColor:kColorWithRGB(0xE6E6E6)];
    }
}
    

@end
